package org.tong.swagger;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import org.tong.base.Response;
import org.tong.jpa.entities.Student;
import org.tong.swagger.req.StudentReq;

/**
 * @author
 * @date 2022-08-23 18:41
 */
@RestController
@Api("swagger注解测试控制层接口")
public class SwaggerController {

    @PostMapping("/queryStudent")
    @ApiOperation("查询学生接口")
    Response<Student> queryStudent(@RequestBody StudentReq req) {
        return Response.success(new Student(1L, "小明", 1));
    }
}
